import jsonschema

data = {
    "success": True,
    "code": 10000,
    "message": "操作成功",
    "money": 6.66,
    "address": None,
    "data": {
        "name": "tom",
        "age": 18
    },
    "luckyNumber": [6, 8, 9]}
schema =  {
    "type":"object",
    "properties": {
        "success":{"type":"boolean"},
        "code":{"type":"integer"},
        "message":{"type":"string"},
        "money":{"type":"number"},
        "adress":{"type":"null"},
        "data":{
            "type":"object",
        "properties":{
            "name":{"type":"string"},
            "age":{"type":"integer"}

}
    },
        "luckyNumber":{"type":"array"}
}
}
#校验结果
res = jsonschema.validate(instance=data,schema=schema)
print(res)